package com.changgou.goods.service.impl;

import com.changgou.goods.dao.ImportLogMapper;
import com.changgou.goods.pojo.ImportLog;
import com.changgou.goods.service.ImportLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Jiang Yilin
 * @title: ImportLogServiceImpl
 * @projectName changgou_parent
 * @description: TODO
 * @date 2020/3/710:23
 */
@Service
public class ImportLogServiceImpl implements ImportLogService {

    @Autowired
    private ImportLogMapper importLogMapper;


    /**
     * 根据ID查询
     * @param id
     * @return
     */
    @Override
    public ImportLog findById(Integer id){
        return  importLogMapper.selectByPrimaryKey(id);
    }


    /**
     * 增加
     * @param ImportLog
     */
    @Override
    public void add(ImportLog ImportLog){
        importLogMapper.insert(ImportLog);
    }


    /**
     * 修改
     * @param ImportLog
     */
    @Override
    public void update(ImportLog ImportLog){
        importLogMapper.updateByPrimaryKeySelective(ImportLog);
    }

    /**
     * 删除
     * @param id
     */
    @Override
    public void delete(Integer id){

        importLogMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<ImportLog> queryByBean(ImportLog log) {
        return importLogMapper.select(log);
    }

}
